import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'home',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/home.vue'),
    meta: {
      notTrun: true,
    },
  },
  {
    path: '/map',
    name: 'map',
    component: () => import('../views/map.vue'),
    meta: {
      notTrun: true,
    },
  },
  {
    path: '/',
    name: 'login',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/login/index.vue'),
    meta: {
      notTrun: false,
    },
  },

  {
    path: '/Dust',
    name: 'Dust',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/Dust.vue'),
    meta: {
      notTrun: true,
    },
  },
  {
    path: '/Configure',
    name: 'Configure',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/Configure.vue'),
    meta: {
      notTrun: true,
    },
  },
  {
    path: '/protect',
    name: 'protect',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/protect.vue'),
    meta: {
      notTrun: true,
    },
  },
  {
    path: '/metering',
    name: 'metering',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/metering.vue'),
    meta: {
      notTrun: true,
    },
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
